package com.a2020111222.test.mapper;

import com.a2020111222.test.pojo.menu;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface menuMapper {

    List<menu> selectMenuByClsId(Long id);

    @Select("SELECT * FROM stuinfo where clsId=#{id};")
    List<menu> selectMenuByClsId2(Long id);
    int insetMenu(menu menu);
    menu selectData(int stuNo);
    //注解查询
    @Select("select * from stuinfo where stuNo=#{id}")
    public menu findById(int id);
    //注解查询
    @Update("update stuinfo set stuName=#{stuName} where stuNo=#{stuNo}")
    public int updateById(menu menu);
    //注解参数
    @Select("select * from stuinfo where stuAge<#{param1} and stuAge>#{param2};")
            public List<menu> findPageListById(@Param("param1") int start, @Param("param2") int end);
    //注解删除
    @Update("delete from stuinfo where id=#{id}")
    public int deleteById(int id);


}
